<?php
if ( IPB_THIS_SCRIPT != 'admin' )
{
	print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'init.php'.";
	exit();
}

class ad_edits
{
	var $ipsclass;
	
	function auto_run()
	{
		if(LIMIT_TO_ONLY_ROOT && $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'])
		{
			$this->ipsclass->admin->error("Sorry, this page is only for root admin only.");
		}
		
		$this->ipsclass->admin->page_title  = "Welcome to Edits Page";
		$this->ipsclass->admin->page_detail = "Welcome to file and skin edits page for ibMarket.<br /><i><b>Warning</b></i>: Please back up your files before applying the edits.";
		$this->ipsclass->admin->nav[] 		= array( $this->ipsclass->form_code.'&amp;code=edits', 'File and Skin Edits' );
		
		$this->ipsclass->html .= $this->ipsclass->adskin->start_table("Files to edit");
		$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row(array(
																			"/sources/ipsclass.php (Optional)<br />/sources/sql/mysql_queries.php (Optional)",
																	)	);
		$this->ipsclass->html .= $this->ipsclass->adskin->end_table();

		$this->ipsclass->adskin->td_header[] = array( "{none}"  , "" );
		$this->ipsclass->adskin->td_header[] = array( "{none}"  , "" );
		
		$this->ipsclass->html .= $this->ipsclass->adskin->start_table("/sources/ipsclass.php (optional)");
		$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic('About line 5924', 'left', 'tablesubheader');
		$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row(array(
																			"Find",
																			"<textarea rows='5' cols='50' class='multitext' style='width:98%'>		\$member['addresscard']     = \$member['id'] ? \$this->compiled_templates[ \$skin_file ]->member_icon_vcard( \$member['id'] ) : '';\n</textarea>",
																	)	);
		$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row(array(
																			"Under the function",
																			"parse_member( \$member=array(), \$custom_fields=1, \$skin_file='skin_topic' )",
																	)	);
		$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row(array(
																			"Add after",
																			"<textarea rows='5' cols='50' class='multitext' style='width:98%'>		include(ROOT_PATH.\"sources/market/topics.php\");\n</textarea>",
																	)	);
		$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row(array(
																			"It will look like",
																			"<textarea rows='5' cols='50' class='multitext' style='width:98%'>		\$member['addresscard']     = \$member['id'] ? \$this->compiled_templates[ \$skin_file ]->member_icon_vcard( \$member['id'] ) : '';\n		include(ROOT_PATH.\"sources/market/topics.php\");\n</textarea>",
																	)	);
		$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
		
		$this->ipsclass->adskin->td_header[] = array( "{none}"  , "" );
		$this->ipsclass->adskin->td_header[] = array( "{none}"  , "" );
		
		$this->ipsclass->html .= $this->ipsclass->adskin->start_table("/sources/sql/mysql_queries.php (optional)");
		$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic('About line 167', 'left', 'tablesubheader');
		$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row(array(
																			"Find",
																			"<textarea rows='5' cols='50' class='multitext' style='width:98%'>				me.msnname,me.aim_name,me.icq_number,me.signature, me.website,me.yahoo,me.location, me.avatar_location, me.avatar_type, me.avatar_size, m.members_display_name</textarea>",
																	)	);
		$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row(array(
																			"Under the functions",
																			"topics_get_posts( \$a )",
																	)	);
		$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row(array(
																			"Add after",
																			"<textarea rows='5' cols='50' class='multitext' style='width:98%'>,m.\".\$GLOBALS['ipsclass']->vars['market_members_field'].\"</textarea>",
																	)	);
		$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row(array(
																			"It will look like",
																			"<textarea rows='5' cols='50' class='multitext' style='width:98%'>				me.msnname,me.aim_name,me.icq_number,me.signature, me.website,me.yahoo,me.location, me.avatar_location, me.avatar_type, me.avatar_size, m.members_display_name,m.\".\$GLOBALS['ipsclass']->vars['market_members_field'].\"</textarea>",
																	)	);
		$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic('About line 183', 'left', 'tablesubheader');
		$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row(array(
																			"Find",
																			"<textarea rows='5' cols='50' class='multitext' style='width:98%'>				me.msnname,me.aim_name,me.icq_number,me.signature, me.website,me.yahoo,me.location, me.avatar_location, me.avatar_type, me.avatar_size, m.members_display_name,</textarea>",
																	)	);
		$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row(array(
																			"Under the functions",
																			"topics_get_posts_with_join( \$a )",
																	)	);
		$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row(array(
																			"Add after",
																			"<textarea rows='5' cols='50' class='multitext' style='width:98%'>m.\".\$GLOBALS['ipsclass']->vars['market_members_field'].\",</textarea>",
																	)	);
		$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row(array(
																			"It should look like",
																			"<textarea rows='5' cols='50' class='multitext' style='width:98%'>				me.msnname,me.aim_name,me.icq_number,me.signature, me.website,me.yahoo,me.location, me.avatar_location, me.avatar_type, me.avatar_size, m.members_display_name,m.\".\$GLOBALS['ipsclass']->vars['market_members_field'].\",</textarea>",
																	)	);
		$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
		
		$this->ipsclass->html .= $this->ipsclass->adskin->start_table("Templates to edit");
		$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row(array(
																			"Topic View Skin<br />- RenderRow (Optional)",
																	)	);
		$this->ipsclass->html .= $this->ipsclass->adskin->end_table();

		$this->ipsclass->adskin->td_header[] = array( "{none}"  , "" );
		$this->ipsclass->adskin->td_header[] = array( "{none}"  , "" );
		
		$this->ipsclass->html .= $this->ipsclass->adskin->start_table("Topic View Skin (optional)");
		$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic('RenderRow', 'left', 'tablesubheader');
		$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row(array(
																			"How to get there",
																			"Go click the LOOK & FEEL tab on top or <a href='".$this->ipsclass->base_url."&amp;section=lookandfeel' target='_blank'>here</a> open a new window.<br />Click Skin Manager on the left.<br />On each skin, clikc the options icon and click Edit Template HTML.<br />Click Topic View, then click RenderRow on the right side.",
																	)	);
		$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row(array(
																			"Find on the top",
																			"<textarea rows='5' cols='50' class='multitext' style='width:98%'>        		{\$author['member_number']}<br />\n</textarea>",
																	)	);
		$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row(array(
																			"Add after",
																			"<textarea rows='5' cols='50' class='multitext' style='width:98%'>        		{\$author['market']}\n</textarea>",
																	)	);
		$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
		
		$this->ipsclass->admin->output();
	}
}
?>